public class test_23_3_19 {

    public static boolean printArry(int[] a) {
        for (int i = 0; i < a.length; i++) {
            System.out.print(a[i]);
        }
        System.out.println("");
        return true;
    }

    public static void transform(int[] a) {
        for (int k : a) {
            k *= 2;
        }
    }

    public static long sum(int[] a) {
        long sum = 0;
        for (int k : a) {
            sum += k;
        }
        return sum;
    }

    public static double avg(int[] a) {
        double ret = 0;
        for (int k : a) {
            ret += (double) k;
        }
        return (ret * 1.0) / (a.length);
    }

    public static void func(int[] a) {
        int l = 0, r = a.length;
        while (l < r) {
            while (l < r && l < a.length && (a[l] & 2) == 1) l++;
            while (l < r && r >= a.length && (a[r] & 2) == 0) r--;
            if (l < r) {
                int t = a[l];
                a[l] = a[r];
                a[r] = t;
            }
        }
    }



    public static int binarySearch(int[] a,int key) {
        int l = 0;
        int r = a.length-1;
        while (l <= r) {
            int m = (l+r) / 2;
            if(a[m] > key) {
                r = m -1;
            }else if(a[m] < key) {
                l= m + 1;
            }else {
                return m;
            }
        }
        return -1;
    }


    public static void bubbleSort(int[] a) {

        for (int i = 0; i < a.length-1; i++) {
            boolean ok = false;
            for (int j = 0; j < a.length-1-i; j++) {
                if(a[j] > a[j+1]) {
                    int tmp = a[j];
                    a[j] = a[j+1];
                    a[j+1] = tmp;
                    ok = true;
                }
            }
            if(ok == false) {
                break;
            }
        }
    }



    public int[] twoSum(int[] nums, int target) {
        int n = nums.length;
        for (int i = 0; i < n; ++i) {
            for (int j = i + 1; j < n; ++j) {
                if (nums[i] + nums[j] == target) {
                    return new int[]{i, j};
                }
            }
        }
        return new int[0];
    }


    public static int find(int[] a)
    {
        int ret=0;
        for(int k:a) ret^=k;
        return ret;
    }

    public  static int find2(int[] a)
    {
        a.sort(a);
        return a[a.length/2];
    }

    public  static  boolean find3(int[] a)
    {
        int num=0;
        for(int k:a)
        {
            if((k&1)==1) num++;
            else num=0;
            if(num==3) return true;
        }
        return false;
    }




    class Data {

        private int x;
        private int y;

        private Data(int x, int y) {
            x = x;
            y = y;
        }

        public int getX() {
            return x;
        }

        public int getY() {
            return y;
        }

    }


    class Person
    {
        private int age;
        public void setAge(int gae)
        {
            if(age<0) this.age=0;
            else if(age>200) this.age=200;
            else this.age=age;
        }
        public int getAge()
        {
            return this.age;
        }
    }



    public static void main(String[] args) {
        int[] a = new int[100];
        for (int i = 0; i < a.length; i++) {
            a[i] = i + 1;
        }
    }
}
